import { Get } from '@/utils/request'
import {
  queryBannerParams,
  queryBriefingParams,
  queryBusinessCardParams,
  respBannerData,
  respBriefingListData,
  respBusinessCardData,
} from './types'
import { respCommonList } from './types/common'

//项目用户相关的请求地址
enum API {
  // 轮播url
  HEADER_BANNER_URL = '/admin-api/base/system/home/banner/pagelist',
  // 获取公司简介URL
  BRIEFING_URL = '/admin-api/base/system/home/briefing/queryByPosition',
  // 获取名片列表URL
  // BUSINESS_CARD_URL = '/admin-api/home/businessCard/enabledlist',
  BUSINESS_CARD_URL = '/admin-api/base/system/home/businessCard/pagelist',
}

//获取轮播图列表
export const reqGetBannerList = (reqData: queryBannerParams) =>
  Get<respCommonList<respBannerData[]>>(API.HEADER_BANNER_URL, reqData, reqData)
//获取公司简介
export const reqGetBriefingList = (reqData: queryBriefingParams) =>
  Get<respBriefingListData>(API.BRIEFING_URL, reqData, reqData)
//获取名片列表
export const reqGetBusinessCardList = (reqData: queryBusinessCardParams) =>
  Get<respCommonList<respBusinessCardData[]>>(
    API.BUSINESS_CARD_URL,
    reqData,
    reqData,
  )
